# set project name
PROJECT (aside)

# ==========================================================
# cmake settings
# ==========================================================
CMAKE_MINIMUM_REQUIRED(VERSION 2.2)
SET(CMAKE_COLOR_MAKEFILE ON)
SET(CMAKE_VERBOSE_MAKEFILE ON)
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
# ----------------------------------------------------------

# ==========================================================
# set project executable name
# ==========================================================
IF (WIN32)
  SET (LIB_NAME aside)
ELSE (WIN32)
  SET (LIB_NAME aside)
ENDIF (WIN32)
# ----------------------------------------------------------

# ==========================================================
# set needed sources
# ==========================================================
SET (
  SOURCES
  ./src/base/ctimesynchronizer.cpp
  ./src/exception/casideexception.cpp
  ./src/gui/cborder.cpp
  ./src/gui/ccombobox.cpp
  ./src/gui/cbutton.cpp
  ./src/gui/cdefaultstyles.cpp
  ./src/gui/cdialog.cpp
  ./src/gui/cdynamicguiobject.cpp
  ./src/gui/cedit.cpp
  ./src/gui/cguidefaultstylesloader.cpp
  ./src/gui/cguiobject.cpp
  ./src/gui/clabel.cpp
  ./src/gui/clayout.cpp
  ./src/gui/clayoutitem.cpp
  ./src/gui/cspinbox.cpp
  ./src/io/cbinary.cpp
  ./src/io/cinchunk.cpp
  ./src/io/coutchunk.cpp
  ./src/io/3ds/c3dsimporter.cpp
  ./src/math/cbigint.cpp
  ./src/math/cequationutils.cpp
  ./src/math/cfraction.cpp
  ./src/math/cintmath.cpp
  ./src/math/cline2d.cpp
  ./src/math/cline3d.cpp
  ./src/math/cmath.cpp
  ./src/math/cmatrix.cpp
  ./src/math/cmatrixbase.cpp
  ./src/math/cmodelmatrix2d.cpp
  ./src/math/cmodelmatrix3d.cpp
  ./src/math/cplane3d.cpp
  ./src/math/crect.cpp
  ./src/math/csimplexutils.cpp
  ./src/math/cvector.cpp
  ./src/math/cvector2d.cpp
  ./src/math/cvector3d.cpp
  ./src/math/cvectorbase.cpp
  ./src/model/ccolor.cpp
  ./src/model/cmaterial.cpp
  ./src/model/cmesh.cpp
  ./src/model/cmodel.cpp
  ./src/string/cstringutils.cpp
  ./src/string/bundle/cresourcebundle.cpp
  ./src/string/logger/clogger.cpp
  ./src/string/parser/capfnode.cpp
  ./src/string/parser/capfparser.cpp
  ./src/string/parser/cparserstatemanager.cpp
  ./src/string/parser/ctokenizer.cpp
)
# ----------------------------------------------------------

# ==========================================================
# link mingw32 library
# ==========================================================
IF (CMAKE_COMPILER_IS_MINGW)
  LINK_LIBRARIES (
    mingw32
  )
  MESSAGE("-- Using -lmingw32 OK")
ENDIF (CMAKE_COMPILER_IS_MINGW)
# ----------------------------------------------------------

# ==========================================================
# target executable
# ==========================================================
ADD_LIBRARY (
  ${LIB_NAME} SHARED
  ${SOURCES}
)
# ----------------------------------------------------------
